﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data.Odbc;
using System.Data.OleDb;
using System.Configuration;



/// <summary>
/// Summary description for GetSelectedDate
/// </summary>
public class GetSelectedDate
{
	public GetSelectedDate()
	{

	}



    public void getDBdatetime() 
    {
         String ConString = ConfigurationManager.ConnectionStrings["myDBConnection"].ConnectionString;
         using (SqlConnection connection = new SqlConnection(ConString))
         {

             connection.Open();
             SqlCommand command = new SqlCommand("bookingDateTime", connection);
             command.CommandType = System.Data.CommandType.StoredProcedure;


             connection.Close();

         }
    }

//    public void GetSelectedDT(String date, String Stime, String Etime) 
 //   {

        //String mydate1 = date + " " + Stime;
        //String mydate2 = date + " " + Etime;

        //DateTime time1 = Convert.ToDateTime(mydate1);
        //DateTime time2 = Convert.ToDateTime(mydate2);

        //TimeSpan tot = time2.Subtract(time1);


        //Console.WriteLine("Year: {0}, Month: {1}, Day: {2}", time1.Year, time1.Month, time1.Day);
        //String Sdate = date + " " + Stime;
        //String Edate = date + " " + Etime;

        //DateTime time1 = Convert.ToDateTime(Stime);
        //DateTime time2 = Convert.ToDateTime(Etime);

        //String frtime = time1.ToString();

        //String setime = time1.ToString();

        //DateTime myDate = DateTime.ParseExact(Sdate, "MM/DD/YYYY HH:MM", CultureInfo.InvariantCulture);
 //   }

}